package com.yztctech.a14_01_customprovider;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by bodhixu on 2016/9/9.
 */
public class DBHelper extends SQLiteOpenHelper{

    //数据库的名称
    public static final String DB_NAME = "students.db";

    //数据库的版本号
    public static final int DB_VERSION = 1;

    public DBHelper(Context context) {
        super(context, DB_NAME, null, DB_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        sqLiteDatabase.execSQL("CREATE TABLE student(_id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT, age INTEGER)");
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

    }

}
